package Day20;

public class Recuision02{
    public static void main(String[] args) {
        A a = new A();
        int day = 1;
        int res = a.peach(day);
        System.out.println(res);
    }

}
class A{
    public int peach(int day){
        if(day == 10){
            return 1;
        }else if(day >= 1 && day <= 9){
            return (peach(day + 1) + 1) * 2;
        }else{
            System.out.println("请输入整数");
            return -1;
        }
    }
}

